widget: get_widget_windows() don't modify window child lists
authorAlexander Larsson <alexl@redhat.com>
Mon, 21 Sep 2015 13:32:34 +0000 (15:32 +0200)
committerAlexander Larsson <alexl@redhat.com>
Mon, 21 Sep 2015 14:59:51 +0000 (16:59 +0200)
We can't modify the lists returned from gdk_window_peek_children,
instead use get_children().

gtk/gtkwidget.c

index 2ec9c04fc0eaf9bb81655fe28d4cf2ba4d93d552..8dd39ce5acde3752dbb7b29767a6ff51de4b6c48 100644 (file)
@@ -4991,8 +4991,7 @@ get_widget_windows (GtkWidget *widget)
   if (gtk_widget_get_has_window (widget))
     window_list = g_list_prepend (NULL, gtk_widget_get_window (widget));
   else
-    window_list = gdk_window_peek_children (gtk_widget_get_window (widget));
-
+    window_list = gdk_window_get_children (gtk_widget_get_window (widget));
   last = g_list_last (window_list);
   ret = NULL;
 
@@ -5006,7 +5005,7 @@ get_widget_windows (GtkWidget *widget)
         continue;
 
       ret = g_list_prepend (ret, l->data);
-      children = gdk_window_peek_children (GDK_WINDOW (l->data));
+      children = gdk_window_get_children (GDK_WINDOW (l->data));
 
       if (children)
         {